package com.marktotop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.marktotop.entity.Department;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author marktotop
 * @since 2021-05-23
 */
@Repository
public interface DepartmentMapper extends BaseMapper<Department> {
    /**
     * 查询所有部门
     * @param parentId
     * @return
     */
    List<Department> getAllDepartment(@Param("parentId") int parentId);

    /**
     * 添加部门
     * @param department
     */
    void addDept(Department department);

    /**
     * 删除部门
     * @param department
     */
    void delDept(Department department);
}
